package com.xinzhi.controller;

import com.xinzhi.pojo.Year;
import com.xinzhi.service.GradeAppealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin(origins = "http://localhost:8090")
public class GradeAppealController {
    @Autowired
    private GradeAppealService gradeAppealService;

    /**
     * 成绩申诉根据年份、类型、状态查询的接口
     * @param yearNumber
     * @param appealType
     * @param statet
     * @return
     */
    @GetMapping("/selectAll")
    public List<Year> selectAll(
            @RequestParam(required = false) String yearNumber,
            @RequestParam(required = false) String appealType,
            @RequestParam(required = false) String statet) {
        return gradeAppealService.selectAll(yearNumber, appealType, statet);
    }
}
